/* 
 * File:   RpcDeliveryClient.hpp
 * Author: bd
 *
 * Created on April 2, 2011, 6:32 PM
 */

#ifndef RpcDELIVERYCLIENT_HPP
#define	RpcDELIVERYCLIENT_HPP

#include "DeliveryClient.hpp"
#include <boost/asio.hpp>

using boost::asio::ip::tcp;

class RpcDeliveryClient : public DeliveryClient {
public:
    RpcDeliveryClient(const std::string& connStr);
    virtual ~RpcDeliveryClient();

    void connect();
    void send(const ShortMsgItem& smi);
private:
    //boost::shared_ptr<msgsys::client> rpcclient_;
    boost::shared_ptr<tcp::iostream> socket_;
    static const std::string DELIVER_SM;
    static const std::string DELIVER_SM_;
private:
    RpcDeliveryClient();
    RpcDeliveryClient & operator=(const RpcDeliveryClient&);
};

//void to_transport_object(const ShortMsgItem& smi, manifestorpc::ProtobufShortMsgItem& dest);
#endif	/* THRIFTDELIVERYCLIENT_HPP */

